<template>
	<sysJk :label="'15.消防应急照明和疏散指示系统组件检查和功能测试'" showBack :withoutTop="true" :leftTime="lefttime">
		<template v-slot:content>
			<view class="warp" id="warp" @touchmove.stop="()=>{}">
				<view class="w100" v-if="curnum==0">
					<view class="taskTit">
						{{questions[curnum]}}
					</view>
					<view class="imgview" :style="{height:'calc(100vh - '+tH+'px)'}">
						<image :src="bUrl" style="width:100%;height:100%;position:absolute;top:0;z-index: 0;"></image>
					</view>
					<view class="myCard">
						<view class="cardContent">

							<view class="answerview1">
								<view class="ytitle"> 请判断应急灯具点亮情况</view>
								<view> </view>
								<radio-group @change="aChange">
									<label class="ritem" v-for="item,index in answer1" :key="index">
										<view>
											<radio :value="item" :checked="da1 === item" :style="{transform:'scale('+heightBl+')'}" />{{item}}
										</view>
									</label>
								</radio-group>
							</view>

							<view class="handleBtn">
								<u-button v-if="examType==1" :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'green',color:'#fff',fontSize:'3vh'}"
									@click='explain(0)'>查看解析</u-button>
							</view>
							<view class="btnA">
								<view v-if="isarea" class="areas">
									<view class="areasTit">场景选择</view>
									<view :class="curarea==0?'areaitem sitem':'areaitem'" @click="setarea(0)">
										<image class="aimg" :src="area1"></image>消防控制室
									</view>
									<view :class="curarea==1?'areaitem sitem':'areaitem'" @click="setarea(1)"> <image
											class="aimg" :src="area2"></image>走廊
									</view>
								</view>
								<view class="btnArea "><u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="senda1()">提交</u-button>
									<u-button @click="reset1()"
										:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
										>重做</u-button>
									<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="back()">返回</u-button>
								</view>
							</view>


							<view v-if="isa1area1" id="area11" class="openiv"
								:style="{ left:a1area1left,top:a1area1top}" @tap="openimgview('15-2',152)">
								<image class="openi" :src="openimg"></image>
							</view>

							<view v-if="isa1152" id="area12" class="openiv down "
								:style="{ width:a1a1521w,height:a1a1521h , left:a1a1521left,top:a1a1521top}"
								@tap="openli()">

							</view>

							<view v-if="isa1152" id="area13" class="openiv" :style="{ left:a1a1522left,top:a1a1522top}"
								@tap="openimgview('15-1',151)">
								<image class="openi" :src="closeimg"></image>
							</view>

							<view v-if="isa1152on && isa1152" id="area152" class="openiv"
								:style="{ left:a1a1523left,top:a1a1523top,width:a1a1523w,height:a1a1523h}">
								<image class="openi openiv" :src="green"
									:style="{ left:a1a1523left,top:a1a1523top,width:a1a1523w,height:a1a1523h}"></image>
							</view>


						</view>
					</view>
					<u-mask :show="showFlag" @click="onClickHide">
						<view class="wrapper"
							style="display: flex;align-items: center;justify-content: center;height:100%">
							<view class="block" style="width:200px;height:200px;background: #fff;">12345</view>
						</view>
					</u-mask>

				</view>
				<view class="w100" v-if="curnum==1">
					<view class="taskTit">
						{{questions[curnum]}}
					</view>
					<view class="imgview" :style="{height:'calc(100vh - '+tH+'px)'}">
						<image :src="bUrl" style="width:100%;height:100%;position:absolute;top:0;z-index: 0;"></image>
					</view>
					<view class="myCard">
						<view class="cardContent">

							<view class="answerview">
								<view class="ytitle"> 人员密集场所的楼梯间、前室的地面最低水平照度不应低于 ？</view>
								<view> </view>
								<radio-group @change="aChange2">
									<label class="ritem" v-for="item,index in answer2" :key="index">
										<view>
											<radio :value="item" :checked="da2	 === item" :style="{transform:'scale('+heightBl+')'}" />{{item}}
										</view>
									</label>
								</radio-group>
							</view>

							<view class="handleBtn">
							
								<u-button v-if="examType==1" :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click='explain(1)'>查看解析</u-button>
							</view>


							<view class="btnA">
								<view v-if="isarea" class="areas">
									<view class="areasTit">场景选择</view>
									<view :class="curarea==0?'areaitem sitem':'areaitem'" @click="setarea(0)">
										<image class="aimg" :src="area1"></image>消防控制室
									</view>
									<view :class="curarea==1?'areaitem sitem':'areaitem'" @click="setarea(1)"> <image
											class="aimg" :src="area2"></image>走廊
									</view>
								</view>
								<view class="btnArea">
									<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="senda2()">提交</u-button>
									<u-button @click="reset2()"
										:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
										>重做</u-button>
									<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="back()">返回</u-button>
								</view>

							</view>
							<view v-if="istool" class="toolbox">
								<view class="tc1">工具箱</view>
								<view class="toolitems">
									<view class="toolitem" :class="toolid==1?'bord':''" @click="seltool(1)">
										<view>
											<image class="toolimg" :src="tool1"></image>
										</view>
										<view class="tc">感温探测器</view>
									</view>
									<view class="toolitem" :class="toolid==2?'bord':''" @click="seltool(2)">
										<view>
											<image class="toolimg" :src="tool2"></image>
										</view>
										<view class="tc">感烟探测器</view>
									</view>
									<view class="toolitem" :class="toolid==3?'bord':''" @click="seltool(3)">
										<view>
											<image class="toolimg" :src="tool3"></image>
										</view>
										<view class="tc">消防电话</view>
									</view>
									 
									<view class="toolitem" :class="toolid==5?'bord':''" @click="seltool(5)">
										<view>
											<image class="toolimg" :src="tool5"></image>
										</view>
										<view class="tc"> 照度计</view>
									</view>
									<view class="toolitem" :class="toolid==6?'bord':''" @click="seltool(6)">
										<view>
											<image class="toolimg" :src="tool6"></image>
										</view>
										<view class="tc">风速仪</view>
									</view>
									<view class="toolitem" :class="toolid==7?'bord':''" @click="seltool(7)">
										<view>
											<image class="toolimg" :src="tool7"></image>
										</view>
										<view class="tc">微压计</view>
									</view>
								 
								</view>
								<view class="toolbtn" @tap="toolclick()">确定</view>
							</view>
						</view>
					</view>
					<u-mask :show="showFlag" @click="onClickHide">
						<view class="wrapper"
							style="display: flex;align-items: center;justify-content: center;height:100%">
							<view class="block" style="width:200px;height:200px;background: #fff;">12345</view>
						</view>
					</u-mask>
				</view>

				<view class="w100" v-if="curnum==2">
					<view class="taskTit">
						{{questions[curnum]}}
					</view>
					<view class="imgview" :style="{height:'calc(100vh - '+tH+'px)'}">
						<image :src="bUrl" style="width:100%;height:100%;position:absolute;top:0;z-index: 0;"></image>
					</view>
					<view class="myCard">
						<view class="cardContent">

							<view class="answerview">
								<view class="ytitle"> 请选择应急照明灯具的应急转换时间</view>
								<view> </view>
								<radio-group @change="aChange3">
									<label class="ritem" v-for="item,index in answer3" :key="index">
										<view>
											<radio :value="item" :checked="da3 === item" :style="{transform:'scale('+heightBl+')'}" />{{item}}
										</view>
									</label>
								</radio-group>
							</view>


							<view class="handleBtn">
							
								<u-button v-if="examType==1" :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'green',color:'#fff',fontSize:'3vh'}"
									@click='explain(2)'>查看解析</u-button>
							</view>


							<view class="btnA">
								<view v-if="isarea" class="areas">
									<view class="areasTit">场景选择</view>
									<view :class="curarea==0?'areaitem sitem':'areaitem'" @click="setarea(0)">
										<image class="aimg" :src="area1"></image>消防控制室
									</view>
									<view :class="curarea==1?'areaitem sitem':'areaitem'" @click="setarea(1)"> <image
											class="aimg" :src="area2"></image>走廊
									</view>
								</view>
								<view class="btnArea">
									<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="senda3()">提交</u-button>
									<u-button @click="reset3()"
										:custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
										>重做</u-button>
									<u-button :custom-style="{width:'100rpx',height:'30rpx',borderRadius:'10rpx',marginRight:'10px',background:'#1E90FF',color:'#fff',fontSize:'3vh'}"
									@click="back()">返回</u-button>
								</view>

							</view>
							<view class="writeBox" id="writeBox" :style="{left:writeBoxLeft,top:writeBoxTop}"
								@tap="showDialog">
							</view>
							<view v-if="istool" class="toolbox">
								<view class="tc1">工具箱</view>
								<view class="toolitems">
									<view class="toolitem" :class="toolid==1?'bord':''" @click="seltool(1)">
										<view>
											<image class="toolimg" :src="tool1"></image>
										</view>
										<view class="tc">感温探测器</view>
									</view>
									<view class="toolitem" :class="toolid==2?'bord':''" @click="seltool(2)">
										<view>
											<image class="toolimg" :src="tool2"></image>
										</view>
										<view class="tc">感烟探测器</view>
									</view>
									<view class="toolitem" :class="toolid==3?'bord':''" @click="seltool(3)">
										<view>
											<image class="toolimg" :src="tool3"></image>
										</view>
										<view class="tc">消防电话</view>
									</view>
									 
									<view class="toolitem" :class="toolid==5?'bord':''" @click="seltool(5)">
										<view>
											<image class="toolimg" :src="tool5"></image>
										</view>
										<view class="tc"> 照度计</view>
									</view>
									<view class="toolitem" :class="toolid==6?'bord':''" @click="seltool(6)">
										<view>
											<image class="toolimg" :src="tool6"></image>
										</view>
										<view class="tc">风速仪</view>
									</view>
									<view class="toolitem" :class="toolid==7?'bord':''" @click="seltool(7)">
										<view>
											<image class="toolimg" :src="tool7"></image>
										</view>
										<view class="tc">微压计</view>
									</view>
									 
								</view>
								<view class="toolbtn" @tap="toolclick1()">确定</view>
							</view>

							<view v-if="isa3156" id="a3156" class="openiv" :style="{ left:a3156left,top:a3156top}"
								@tap="openimgview('15-7',157) ">
								<image class="openi" :src="openimg"></image>
							</view>
							<view v-if="isa3158" id="a3158" class="openiv" :style="{ left:a3158left,top:a3158top}"
								@tap="openimgview('15-9',159)">
								<image class="openi" :src="openimg"></image>
							</view>


							<view v-if="isa3157" id="area13" class="openiv" :style="{ left:a3157tleft,top:a3157ttop}">
								{{time}}
							</view>
							<view v-if="isa3157" id="area821" class="openiv rem7"
								:style="{ left:a1i822left,top:a1i822top,color:'#000'}">
								<view class="flexcol">
									<view v-if="iscreen==0" :style="{ width:stw,height:sth,color:'#000'}"></view>
									<view v-if="iscreen==1" :style="{ width:stw,height:sth,color:'#fff'}">火警信息</view>
									<view v-if="iscreen==2" :style="{ width:stw,height:sth,color:'#fff'}">启动信息</view>
									<view v-if="iscreen==3" :style="{ width:stw,height:sth,color:'#fff'}">反馈信息</view>
									<view class="flexrow">
										<view v-if="iscreen==0"
											:style="{ width:siw,height:sbw,color:'#000',lineHeight:sbw,textAlign:'center'}">
											正常监控状态</view>

										<view v-if="iscreen==1" :style="{ width:siw,height:sbw,color:'#000'}">

											<view><text class="rtext">首警</text> {{stime1}} 1-1手报火警</view>
											<view>{{stime1}} 1-1感烟探测器火警</view>
										</view>
										<view v-if="iscreen==2" :style="{ width:siw,height:sbw,color:'#000'}"> {{info}}
										</view>
										<view v-if="iscreen==3" :style="{ width:siw,height:sbw,color:'#000'}"> {{info}}
										</view>

										<view class="flexcol" :style="{marginLeft:sleft}">
											<view class="flexcol"
												:style="{ width:sbw,height:sbh,color:'#000',marginTop:'3px'}">
												<view style="line-height: 0.4rem;">
													正常运行
												</view>
												<view style="line-height: 0.4rem;">
													手动允许
												</view>
												<view style="line-height: 0.4rem;">
													自动允许
												</view>
											</view>
											<view
												:style="{marginTop:srtt, width:srtw,height:srth,color:'#fff',textAlign:'center'}"
												t80 w137 h30>
												<view style="line-height: 0.4rem;">{{dfulltxt}}</view>
												<view style="line-height: 0.4rem;">{{dtimetxt}}</view>
											</view>
										</view>
									</view>
									<view v-if="iscreen==0" style=" color:#000"
										:style="{ marginTop:sitt, width:s5w,height:s5h,color:'#fff'}">F1查火警
										F2查启动 F3查故障 F4查监管 F5查屏蔽 F6查反馈
									</view>
									<view v-if="iscreen==1" style=" color:#000"
										:style="{ marginTop:sitt, width:s5w,height:s5h,color:'#fff'}">F1查火警
										F2查启动 F3查故障 F4查监管 F5查屏蔽 F6查反馈
									</view>
									<view v-if="iscreen==2" style=" color:#000"
										:style="{ marginTop:sitt, width:s5w,height:s5h,color:'#fff'}">F1页001 F2上一页 F3下一页
										F6退出
									</view>
									<view v-if="iscreen==3" style=" color:#000"
										:style="{ marginTop:sitt, width:s5w,height:s5h,color:'#fff'}">F1页001 F2上一页 F3下一页
										F6退出
									</view>
								</view>
							</view>
							<view v-if="isa3157" id="area13" class="openiv" :style="{ left:a3157cleft,top:a3157ctop}"
								@tap="openimgview('15-6',156)">
								<image class="openi" :src="closeimg"></image>
							</view>
							<view v-if="isa3157" id="area13" class="openiv" :style="{ left:a3157left,top:a3157top}">
								<image class="openi" :src="openimg"></image>
							</view>

							<view v-if="isa3159" id="area158" class="openiv" :style="{ left:a3159cleft,top:a3159ctop}"
								@tap="openimgview('15-8',158)">
								<image class="openi" :src="closeimg"></image>
							</view>

							<view v-if="isa3159" id="a3159f" class="openiv"
								:style="{ left:a3159bleft,top:a3159btop,width:a3159bw,height:a3159bh}"
								@tap="playfire()">

							</view>

							<view v-if="isredbtn && isa3159" id="area3red" class="openiv"
								:style="{ left:a3159fleft,top:a3159ftop,width:a3159fw,height:a3159fh}">
								<image class="openi openiv" :src="red"
									:style="{ left:a3159fleft,top:a3159ftop,width:a3159fw,height:a3159fh}"></image>
							</view>
						</view>
					</view>
					<u-mask :show="showFlag" @click="onClickHide">
						<view class="wrapper"
							style="display: flex;align-items: center;justify-content: center;height:100%">
							<view class="block" style="width:200px;height:200px;background: #fff;">12345</view>
						</view>
					</u-mask>

				</view>
				<u-mask :show="isexplain" @click="closeex" >
					<view class="wrapper" style="display: flex;align-items: center;justify-content: center;height:100%">
						<view class="block"
							style="width:400rpx;padding: 20rpx;box-sizing:border-box;background: #fff;font-size:2vh">
							<view class="overtitle" style="color: #000;">
								【试题解析】 正确答案
							</view>
							<view class="overtitle" style="color: #000;">
								<text>{{explaintext}}</text>
							</view>
						</view>
					</view>
				</u-mask>
			</view>
		</template>
	</sysJk>

</template>


<script>
	import sysJk from '@/components/sysJk.vue'
	import {
		fzQuestion
	} from '@/globalApi/requestApi.js'
	import {
		formatTime,
		getcurtime
	} from '@/util/index.js'
	export default {
		components: {
			sysJk
		},

		data() {
			const app = getApp();
			const baseUrl = app.globalData.requestUrl;

			return {
				widthBl:0,
				heightBl:0,
				time: '',
				info: '',
				lefttime: '330',
				examId: '',
				examType: 1,
				base: baseUrl,
				writeBox: null,
				writeBoxLeft: 0,
				writeBoxTop: 0,
				showFlag: false,
				bUrl: baseUrl + "/static/image/wb/15-1.jpg",
				openimg: baseUrl + "/static/image/open.png",
				closeimg: baseUrl + "/static/image/close.png",
				red: baseUrl + "/static/image/red.png",

				green: baseUrl + "/static/image/green.png",
				questionsnum: 3, //题目数

				curnum: 0, //当前题目

				questions: ['【1/3】请通过应急照明控制器，启动消防应急照明和疏散指示系统，判断应急灯具点亮情况',
					'【2/3】请测量应急照明灯具的照度',
					'【3/3】请模拟火警信号，测试应急照明灯具的应急转换时间',
				],

				answer1: ['应急灯具已点亮', '应急灯具故障，未点亮'],

				answer2: ['3.0lx', '5.0lx', '1.0lx', '10.0lx'],
				answer3: ['1秒', '2秒', '3秒', '5秒'],

				da1: '',
				da2: '',
				da3: '',
				isarea: true, //是否显示场景,

				area1: baseUrl + "/static/image/wb/15-1.jpg",
				area2: baseUrl + "/static/image/wb/15-3.jpg",
				tool1: baseUrl + "/static/image/gw.png", //
				tool2: baseUrl + "/static/image/gy.png", //
				tool3: baseUrl + "/static/image/dh.png", //
				tool4: baseUrl + "/static/image/bs.png", //
				tool5: baseUrl + "/static/image/zm.png", //
				tool6: baseUrl + "/static/image/cf.png", //
				tool7: baseUrl + "/static/image/wyj.png", //
				tool8: baseUrl + "/static/image/cf.png", //
				isa1area1: true,
				isa1area2: false,

				isa2area1: true,
				isa2area2: false,

				isa3area1: true,
				isa3area2: false,

				a1area1left: 0,
				a1area1top: 0,

				isa1152: false,

				///////////////////

				///////////////////

				a1a1521left: 0,
				a1a1521top: 0,
				a1a1521w: 0,
				a1a1521h: 0,

				a1a1522left: 0,
				a1a1522top: 0,

				a1a1523left: 0,
				a1a1523top: 0,
				a1a1523w: 0,
				a1a1523h: 0,


				isa3156: false,
				isa3157: false,
				isa3158: false,
				isa3159: false,

				//15-6
				a3156left: 660,
				a3156top: 540, // to157

				//15-7
				a3157tleft: 428,
				a3157ttop: 110,

				a1i822left: 0,
				a1i822top: 0,


				a3157ileft: 1150,
				a3157itop: 150,

				a3157cleft: 1720,
				a3157ctop: 110,


				a3157left: 755,
				a3157top: 680,


				//15-8
				a3158left: 815,
				a3158top: 615, //to159

				//15-9
				//显示工具箱
				a3159cleft: 1165,
				a3159ctop: 275,

				a3159bleft: 1003,
				a3159btop: 189, //frie
				a3159bw: 0, //40
				a3159bh: 0, //46

				a3159fleft: 0, //980
				a3159ftop: 0, // 360
				a3159fw: 0, //20
				a3159fh: 0, //20
				//返回15-8 ,使用工具测烟之后显示15-10
				//15-10 数字加到3秒

				//
				iscreen: 0, //屏状态  0 正常状态 1火警状态  2 f2 信息  f6退出  3，f6 查反馈  f6 退出   5复位 回到1
				stime1: '',
				dfulltxt: '',
				dtimetxt: '',

				stw: '479',
				sth: '28',
				sleft: "10",
				siw: '330',
				sih: '200',
				sbw: '146',
				sbh: "68",
				srtw: '138',
				srth: '30',
				srtt: '80',
				sitt: '15',
				s5w: "495",
				s5h: '25',

				curarea: 0,

				istool: false,
				tooltop: 0,
				toolid: 0,
				isck2: false,
				iscg: false, //是否测转换光

				innerAudioContext: uni.createInnerAudioContext(),
				jb: baseUrl + "/static/image/jb.MP3",
				quest: {
					fz_id: 2,
					title: '',
					no: "",
					question_type: 1,
					user_answer: '',
					answer: '',
					is_correct: '',
					score: '',
					start_time: 0,
					end_time: 0,
					question_answer: ''
				},
				score1: 0,
				score2: 0,
				score3: 0,
				explainarr: ['应急照明控制器点强启按钮，然后去走廊看灯亮不亮\r\n\r\n正确答案：应急灯具已点亮',
					'工具选照度计。楼梯需要亮一点，选10.0lx\r\n\r\n正确答案：10.0lx',
					'控制室主机自动，去走廊触发两点报火警，选答案\r\n\r\n正确答案：3秒'
				],
				isexplain: false,
				explaintext: '',
				isa1152on: false,
				isredbtn: false,
				tH: 0,
			}
		},
		onLoad(options) {
			uni.setScreenBrightness({
				keepScreenOn: true,
				direction: 'landscape',
				success() {
					console.log("a")
				}
			})
			let that = this;
			let df = new Date()
			let m = df.getMonth() + 1
			this.dfulltxt = df.getFullYear() + "/" + m + df.getDate()

			setInterval(() => {
				let df1 = new Date()
				that.dtimetxt = df1.getHours() + ":" + df1.getMinutes() + ":" + df1.getSeconds()
			}, 1000)
			setInterval(() => {
				that.time = getcurtime()
			}, 20000)
			// uni.getSystemInfo({
			// 	success: function(res) {
			// 		console.log(res)
			// 		// uni.setStorageSync('titleHeight',res.statusBarHeight+capsuleH)
			// 		that.tH = uni.getMenuButtonBoundingClientRect().height + uni
			// 			.getMenuButtonBoundingClientRect().top * 2 + 21;
			// 		that.tooltop = that.tH + "px";
			// 		//that.tH=85 
			// 		that.drawWhiteBox()
			// 	}
			// });
			this.examId = options.examId
			this.examType = options.examType
			// var writeBox = uni.createSelectorQuery().in(this).select('.imgview')
			// writeBox.boundingClientRect(data => {
			// 	this.writeBox = data
			// }).exec()
		},
		onShow() {
			// this.drawWhiteBox()
		},
		onReady() {
				  let that = this;
				  // #ifdef MP-WEIXIN
				  uni.getSystemInfo({
				    success: function(res) {
				      console.log(res)
				      // uni.setStorageSync('titleHeight',res.statusBarHeight+capsuleH)
				      that.tH = uni.getMenuButtonBoundingClientRect().height + uni
				          .getMenuButtonBoundingClientRect().top * 2 + 21
				      //that.tH=85
				      that.drawWhiteBox()
				    }
				  });
				  // #endif
				
				 // #ifdef APP-PLUS
				 let sy = uni.getSystemInfoSync()
				 this.pT = sy.statusBarHeight
				 this.tH = sy.statusBarHeight + 51
				 this.drawWhiteBox(this.tH )
				 
				 // #endif
				},
		methods: {
			back() {
				uni.navigateBack()
			},
			playfire() {
				this.isredbtn = true

				this.innerAudioContext.src = this.jb;
				this.innerAudioContext.onPlay(() => {
					console.log('开始播放');
				});
				this.innerAudioContext.onError((res) => {
					console.log(res.errMsg);
					console.log(res.errCode);
				});
				console.log(this.innerAudioContext.paused)
				if (this.innerAudioContext.paused == true) {

					console.log("play")

					this.innerAudioContext.play();
				} else {
					console.log("stop")
					this.innerAudioContext.stop();
				}
			},
			//强启
			openli() {
				//isa1152on
				this.isa1152on = true
			},
			seltool(id) {
				console.log("settool")
				this.toolid = id
			},
			toolclick() {
				//要提前下载一下8-5 8-5-1
				console.log("tool")
				//判断选择的工具
				console.log(this.toolid)
				if (this.toolid == 5) {

					this.isck2 = true;
					//得分
					this.bUrl = this.base + "/static/image/wb/15-5.jpg"
				}
			},

			//转换时间
			toolclick1() {
				//要提前下载一下8-5 8-5-1
				console.log("tool")
				//判断选择的工具
				console.log(this.toolid)

				if (this.toolid == 2) {
					//得分
					if (this.isredbtn) {
						this.iscg = true
						this.istool = false
						this.isa3158 = false
					}

					this.bUrl = this.base + "/static/image/wb/15-8-1.jpg"
					setTimeout(() => {
						this.bUrl = this.base + "/static/image/wb/15-8-2.jpg"
					}, 200)
					setTimeout(() => {
						this.bUrl = this.base + "/static/image/wb/15-8-1.jpg"
					}, 400)
					setTimeout(() => {
						this.bUrl = this.base + "/static/image/wb/15-8-2.jpg"
					}, 600)
					setTimeout(() => {
						this.bUrl = this.base + "/static/image/wb/15-8-1.jpg"
					}, 800)
					setTimeout(() => {
						this.bUrl = this.base + "/static/image/wb/15-8-2.jpg"
					}, 1000)

					setTimeout(() => {
						this.bUrl = this.base + "/static/image/wb/15-10.jpg"
						//01
					}, 2000)
					setTimeout(() => {
						//02
						this.bUrl = this.base + "/static/image/wb/15-10.jpg"
					}, 3000)
					setTimeout(() => {
						this.bUrl = this.base + "/static/image/wb/15-11.jpg"
					}, 4000)

					//
				}
			},

			explain(id) {
				this.isexplain = true;
				this.explaintext = this.explainarr[id]

			},
			closeex() {
				this.isexplain = false
			},
			aChange(e) {
				this.da1 = e.detail.value
			},
			aChange2(e) {
				this.da2 = e.detail.value
			},
			aChange3(e) {
				this.da3 = e.detail.value
			},
			reset() {
				this.isarea = true //是否显示场景
				this.isa1area1 = true
				this.isa1area2 = false

				this.isa2area1 = true
				this.isa2area2 = false

				this.isa3area1 = true
				this.isa3area2 = false



				this.isa1152 = false
				this.isa3156 = false
				this.isa3157 = false
				this.isa3158 = false
				this.isa3159 = false
				this.iscreen = 0 //屏状态  0 正常状态 1火警状态  2 f2 信息  f6退出  3，f6 查反馈  f6 退出   5复位 回到1
				this.curarea = 0

				this.istool = false

				this.toolid = 0
				this.isck2 = false
				this.iscg = false //是否测转换光
				this.isa1152on = false
				this.isredbtn = false
			},
			reset1() {
				this.reset()
				let that = this
				that.isa1152on = false
				that.da1 = ""

				that.curarea = 0
				that.curnum = 0
				that.isarea = true
				that.setarea(0)


			},
			reset2() {
				this.reset()
				let that = this
				that.isck2 = false
				that.da2 = ""

				that.curnum = 1
				that.isarea = false
				that.bUrl = that.base + "/static/image/wb/15-4.jpg"
				that.istool = true
			},
			reset3() {
				this.reset()
				let that = this
				that.iscg = false
				that.da3 = ""
				that.innerAudioContext.stop()
				that.curnum = 2
				that.isarea = true
				that.isa3156 = true
				that.istool = false
				that.area1 = that.base + "/static/image/wb/15-6.jpg"
				that.area2 = that.base + "/static/image/wb/15-8.jpg"
				that.bUrl = that.base + "/static/image/wb/15-6.jpg"


			},
			senda1() {
				/***
				【1/3】手动操作应急照明控制器，启动消防应急照明和疏散指示系统，判断应急灯具点亮情况【1】
				判断应急灯具点亮情况
				点亮
				未点亮
				【有点亮未点亮两种可能
				*/
				let that = this

				if(this.da1=="" ){
					uni.showToast({
						title:'请选择答案',
						icon:'none'
					})
				 return;
				}
				if (that.isa1152on && that.da1 == "应急灯具已点亮") {
					that.score1 = 1
				} else {
					that.score1 = 0
				}
				this.$showModal2({
					title: '确认提交？'+that.score1,
					// content: '这是一个模态弹窗',
					
				}).then(()=>{
					
							that.curnum = 1
							that.isarea = false
							that.bUrl = that.base + "/static/image/wb/15-4.jpg"
							that.istool = true
					
				});
			},
			senda2() {
				/**
				 * 【2/3】使用照度计测试应急照明灯具的照度【0.5】
				人员密集场所电梯间及地面水平照度不低于
				0.5
				0.7
				0.10
				0.9
				【正确答案0.10】
				 * *
				*/
				let that = this
				if(this.da2=="" ){
					uni.showToast({
						title:'请选择答案',
						icon:'none'
					})
				 return;
				}
				if (that.isck2 && that.da2 == "10.0lx") {
					that.score2 = 0.5
				} else {
					that.score2 = 0
				}
				this.$showModal2({
					title: '确认提交？'+that.score2,
					// content: '这是一个模态弹窗',
					
				}).then(()=>{
					
							that.curnum = 2
							that.isarea = true
							that.isa3156 = true
							that.istool = false
							that.area1 = that.base + "/static/image/wb/15-6.jpg"
							that.area2 = that.base + "/static/image/wb/15-8.jpg"
							that.bUrl = that.base + "/static/image/wb/15-6.jpg"
						
				});
			},
			senda3() {
				/**
				 * 
				 * 
				【3/3】模拟火警信号，测试应急照明灯具的应急转换时间。【0.5】
				
				应急转换时间
				1S
				2S
				3S
				5S
				【正确答案为3s】
				 * *
				*/
			   if(this.da3=="" ){
				   uni.showToast({
				   	title:'请选择答案',
				   	icon:'none'
				   })
			    return;
			   }
				this.innerAudioContext.stop()
				let that = this
				if (that.iscg && that.da3 == "3秒") {
					that.score3 = 0.5
				} else {
					that.score3 = 0
				}
				let ss = that.score1 + that.score2 + that.score3
				this.$showModal2({
					title: '确认提交？'+that.score3,
					// content: '这是一个模态弹窗',
					
				}).then(()=>{
							uni.showLoading({ })
							fzQuestion(that.quest).then(res => {
								uni.hideLoading()
								let pages = getCurrentPages()
								if(pages.length==4){
									let prevPage = pages[pages.length - 3] 
									prevPage.$vm.status15 = true
									prevPage.$vm.addScore(ss)
									uni.navigateBack()
								}else{
									let prevPage = pages[pages.length - 2]
									prevPage.$vm.status15 = true
									prevPage.$vm.addScore(ss) 
									uni.navigateBack()
								} 
							})
						
				});
				// uni.showToast({
				// 	title: '提交后不可修改',
				// 	success() {
				// 		setTimeout(() => {
				// 			uni.navigateBack()
				// 		}, 500)

				// 	}
				// })
				/***
				15消防应急照明和疏散指示系统组件检查和功能测试【2】
				】  
				score1 1
				score2 0.5 
				score3 0.5
				
				*/
			},
			setarea(id) {
				this.curarea = id

				if (this.curnum == 0) {
					if (id == 0) {
						this.isa1area1 = true;
						this.isa1area2 = false
						this.bUrl = this.base + "/static/image/wb/15-1.jpg"
					}
					if (id == 1) {
						this.isa1area1 = false;
						this.isa1area2 = true
						this.bUrl = this.base + "/static/image/wb/15-3.jpg"
					}
				}
				if (this.curnum == 2) {
					if (id == 0) {
						this.isa3156 = true
						this.isa3158 = false
						this.isa3157 = false
						this.isa3159 = false

						this.istool = false
						this.bUrl = this.base + "/static/image/wb/15-6.jpg"
					}
					if (id == 1) {
						if (this.iscg) {
							this.istool = false
							this.isa3158 = false
							this.isa3156 = false
							this.isa3157 = false
							this.isa3159 = false

							this.bUrl = this.base + "/static/image/wb/15-11.jpg"
						} else {
							this.istool = true
							this.isa3158 = true
							this.isa3156 = false
							this.isa3157 = false
							this.isa3159 = false

							this.bUrl = this.base + "/static/image/wb/15-8.jpg"
						}

					}
				}




			},

			openimgview(path, lb) {
				this.isarea = false
				this.isa1area1 = false
				this.isa1area2 = false

				this.bUrl = this.base + "/static/image/wb/" + path + ".jpg";
				switch (lb) {
					case 151:
						this.isarea = true
						this.isa1area1 = true;
						this.isa1area2 = false
						this.isa1152 = false;

						break;
					case 152:
						this.isa1152 = true;
						break;
					case 86:
						this.isa186 = true;
						this.isa182 = false;
						break;
					case 156:
						this.isa3156 = true
						this.isa3157 = false
						this.isarea = true
						break;
					case 157:
						this.isa3157 = true
						this.isa3156 = false
						break;
					case 158:
						this.isa3158 = true
						this.istool = true
						this.isa3159 = false

						this.isarea = true
						break;
					case 159:
						this.isa3159 = true
						this.isa3158 = false
						this.istool = false
						break;



				}
			},
			showDialog() {
				this.showFlag = true
			},
			onClickHide() {
				this.showFlag = false
			},
			drawWhiteBox(statusnum) {
				let that = this
				let warp = uni.createSelectorQuery().in(this).select('.imgview')

				warp.boundingClientRect(data => {
					console.log(that.tH)
					console.log(data)
					console.log(data.width)
					console.log(data.height)
					//有些设备取的是设备高度 data.height


					let widthBl = data.width / 1920
					let sy = uni.getSystemInfoSync()
					let heightBl = 0
					// if (data.height = sy.screenHeight) {
					// 	heightBl = (data.height - that.tH) / 921
					// } else {
					// 	heightBl = (data.height) / 921
					// }
					heightBl = (data.height-that.tH)/921
					that.widthBl=widthBl
					that.heightBl=heightBl


					//a1 area1

					that.a1area1left = 400 * widthBl + 'px'
					that.a1area1top = 600 * heightBl + statusnum + 'px'


					//15-2 
					that.a1a1521left = 916 * widthBl + 'px'
					that.a1a1521top = 448 * heightBl + statusnum + 'px'
					that.a1a1521w = 60 * widthBl + 'px'
					that.a1a1521h = 62 * heightBl + 'px'

					//应急启动点亮
					that.a1a1522left = 1300 * widthBl + 'px'
					that.a1a1522top = 80 * heightBl + statusnum + 'px'

					that.a1a1523left = 574 * widthBl + 'px'
					that.a1a1523top = 238 * heightBl + statusnum + 'px' // 
					that.a1a1523w = 28 * widthBl + 'px'
					that.a1a1523h = 28 * heightBl + 'px'


					//2小问
					//显示工具箱，照明


					//3小问

					//15-6
					that.a3156left = 650 * widthBl + 'px'
					that.a3156top = 490 * heightBl + statusnum + 'px' // to157  

					//15-7
					that.a3157tleft = 411 * widthBl + 'px'
					that.a3157ttop = 99 * heightBl + statusnum + 'px'

					that.a3157ileft = 1130 * widthBl + 'px'
					that.a3157itop = 96 * heightBl + statusnum + 'px'


					that.a1i822left = 1130 * widthBl + 'px' //1130
					that.a1i822top = 96 * heightBl + statusnum + 'px' //96

					that.a3157cleft = 1720 * widthBl + 'px'
					that.a3157ctop = 90 * heightBl + statusnum + 'px'


					that.a3157left = 755 * widthBl + 'px'
					that.a3157top = 650 * heightBl + statusnum + 'px'


					//15-8
					that.a3158left = 815 * widthBl + 'px'
					that.a3158top = 490 * heightBl + statusnum + 'px' //to159

					//15-9
					//显示工具箱
					that.a3159cleft = 1160 * widthBl + 'px'
					that.a3159ctop = 260 * heightBl + statusnum + 'px'

					that.a3159bleft = 995 * widthBl + 'px'
					that.a3159btop = 400 * heightBl + statusnum + 'px' //frie  400

					that.a3159bw = 40 * widthBl + 'px'
					that.a3159bh = 46 * heightBl + statusnum + 'px'

					that.a3159fleft = 980 * widthBl + 'px'
					that.a3159ftop = 365 * heightBl + statusnum + 'px'
					that.a3159fw = 20 * widthBl + 'px'
					that.a3159fh = 20 * heightBl + 'px'



					//标题
					that.stw = 479 * widthBl + 'px'
					that.sth = 28 * heightBl + 'px'
					//中间两部分间隔
					that.sleft = 10 * widthBl + 'px'
					//内容
					that.siw = 340 * widthBl + 'px'
					that.sih = 200 * heightBl + 'px'
					//右边信息
					that.sbw = 146 * widthBl + 'px'
					that.sbh = 77 * heightBl + 'px'
					//右边时间
					that.srtw = 138 * widthBl + 'px'
					that.srth = 30 * heightBl + 'px'
					that.srtt = 90 * heightBl + 'px'
					//底部信息
					that.sitt = 0 * heightBl + 'px'
					that.s5w = 495 * widthBl + 'px'
					that.s5h = 25 * heightBl + 'px'

				}).exec()

				// uni.getSystemInfo({
				// 	success: function(res) {
				// 		console.log(res)
				// 		

				// 	}
				// });
			}
		}
	}
</script>


<style scoped lang="scss">
	.rem7 {
		font-size: 0.4rem;
	}

	.explaincss {
		padding: 20rpx;
		width: 300rpx;

		border-radius: 20rpx;
		border: 1rpx solid #000;
		background-color: #fff;
		color: #000;
		position: fixed;
		top: 50rpx;
		left: 225rpx;
		z-index: 5000;
	}

	.warp {
		height: 100%;
		box-sizing: border-box;
		// padding: 22rpx 33rpx 38rpx 36rpx;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
		background: #F6F6F6;

		.toolimg {
			width: 30rpx;
			height: 30rpx;
		}

		.bord {
			border: 1rpx solid red;
		}

		.toolbtn {
			padding: 5rpx 10rpx;
			background: #ffb700;
			border-radius: 5rpx;
			text-align: center;
		width: 50px;
			margin: auto;
		}

		.toolbox {
			position: fixed;
			right: 220rpx;
			top: 120rpx;
			font-size: 12rpx;
			color: #000;
			background: #fff;
			width: 92rpx;
			border: 1px solid #fff;
		}

		.toolitems {
			display: flex;
			flex-wrap: wrap;
			width: 92rpx;
			justify-content: space-between;
		}

		.toolitem {
			display: flex;
			flex-direction: column;
			width: 30rpx;
			justify-content: space-between;
		}

		
		.tc1 {
			text-align: center;
			font-size: 10px;
			background: orange;
			color: #fff; 
		}
		.tc {
			display: flex;
			align-items: center;
			
			text-align: center;
			font-size: 8px;
			justify-content: center;
			align-content: center; 
		}

		.w100 {
			width: 100%;
			height: 100%;
		}

		.areas {
			// background-color: rgba(255, 165, 0, 0.2);
			margin-bottom:10px;
			.areasTit{
				background: orange;
			}
			color: #000;
		}
		
		.sitem {
			border: 2rpx solid red;
		}
		
		.areaitem {
			background: #fff;
		
			display: flex;
			align-items: center;
			justify-content: flex-start;
		}
		

		.imgview {
			position: relative;
			width: 100%;

		}

		.aimg {
			width: 60rpx;
			height: 35rpx;
		}

		#area12 {
			//background-color: #DA2627;
		}

		.openiv {
			position: fixed;
		}

		.down {}

		.openi {
			width: 20px;
			height: 20px;
		}

		.flexcol {
			display: flex;
			flex-direction: column;
		}

		.flexrow {
			display: flex;
		}


		.answerview {
			position: fixed;
			top: 80rpx;
			left: 40rpx;
			background-color: #ffffff;
			color: #000;
			width: 200rpx;
			font-size: 2vh;
		}

		.answerview1 {
			position: fixed;
			bottom: 55rpx;
			left: 40rpx;
			background-color: #ffffff;
			color: #000;
			width: 200rpx;
			font-size:2vh;
		}


		.ytitle {
			background-color: #ffb700;
			line-height: 26rpx;
		}

		.ritem {
			line-height: 20rpx;
		}
		.taskTit {
			height: 21px;line-height: 21px;width: 100%;text-align: left;background: #fff;color: #000;font-size: 15px
		}
		.myCard {
			width: 100%;
			// height:100%;
			position: relative;
			// border-radius: 20rpx;
			//overflow: hidden;
			z-index: 1;

			.cardContent {
				// padding: 52rpx 58rpx 37rpx;
				box-sizing: border-box;
				width: 100%;
				height: 100%;
				position: relative;
				z-index: 2;
				color: #fff;

				.moneyContent {
					margin-top: 54rpx;
					width: 100%;
					display: flex;
					align-items: center;

					.moneyDetail {
						width: 50%;
						display: flex;
						flex-direction: column;
						align-items: center;
						justify-content: flex-start;

						.detailTit {
							font-size: 24rpx;
							font-weight: 400;
						}

						.detailVal {
							font-size: 55rpx;
							font-weight: bold;
							margin-top: 35rpx;
						}
					}

				}

				

				.handleBtn {
					position: fixed;
					left: 30px;
					bottom: 0px;
				}

				.btnA {
					display: flex;
					flex-direction: column;
					position: fixed;
					right: 30px;
					bottom: 0px;
					align-items: flex-end;
				}

				.btnArea {
					//	margin-top: 160rpx;
					//margin-left: 150rpx;
					display: flex;
					justify-content: center;
					//position:fixed;
					//right:30px;
					//	bottom:30px
					// text-align: center;
				}
			}
		}

		.infoBox {
			width: 100%;
			padding: 14rpx 30rpx;
			margin-top: 33rpx;
			border-radius: 20rpx;
			box-sizing: border-box;
			background: #fff;

			.singleInfo {
				width: 100%;
				box-sizing: border-box;
				padding: 20rpx 0;
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-bottom: 1rpx solid #ccc;

				.info {
					flex: 1;

					.desc {
						font-size: 26rpx;
						font-weight: 400;
						color: #222222;
					}

					.time {
						margin-top: 15rpx;
						font-size: 18rpx;
						font-weight: 400;
						color: #888888;
						display: flex;
						align-items: center;
					}
				}

				.val {
					width: 115rpx;
					height: 40rpx;
					border: 1rpx solid #DA2627;
					border-radius: 40rpx;
					text-align: center;
					font-size: 22rpx;
					font-weight: 400;
					color: #DA2627;
					line-height: 40rpx;
				}
			}
		}

		.writeBox {
			border: none;
			width: 0;
			height: 0;
			position: fixed
		}
	}
</style>